package com.example.sellersale.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.sellersale.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;
import java.util.List;

@Repository
@Transactional(rollbackFor = Exception.class)
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from sys_user where id = #{id}")
    User selectUserInfo(String id);

    @Select("select * from sys_user where name=#{name} and password=#{password}")
    User isLogin(User user);

    @Select("select * from sys_user where status")
    List<User> allUser();
}
